<template>
	<view class="content">
		<!-- 头部部(包含轮播图) -->
		<view class="header">
			<!-- 搜索栏 -->
			<view class="search">
				<!-- 左边搜索，给盒子添加一个点击事件跳转到搜索页面 -->
				<view class="search_left">
					<uni-icons type="search" size="20" style="margin:0 5px;"></uni-icons>
					<text class="placeholder">周杰伦-最伟大的作品</text>
				</view>
				<view class="search_right">
					<button size="mini">搜索</button>
				</view>
			</view>
			<!-- 轮播图部分 -->
			<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" circular>
				<swiper-item>
					<view class="swiper-item">
						<image class="swiper-img" src="../../static/images/swiper1.jpg" mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image class="swiper-img" src="../../static/images/swiper2.jpg" mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image class="swiper-img" src="../../static/images/swiper3.jpg" mode=""></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item">
						<image class="swiper-img" src="../../static/images/swiper4.jpg" mode=""></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
		<!-- 分类部分 -->
		<view class="classify">
			<view class="classify-item">
				<image src="../../static/images/classfiy-1.png" mode=""></image>
				<text>流行</text>
			</view>
			<view class="classify-item">
				<image src="../../static/images/clasfiy-2.png" mode=""></image>
				<text>中国风</text>
			</view>
			<view class="classify-item">
				<image src="../../static/images/classify-3.png" mode=""></image>
				<text>嘻哈</text>
			</view>
			<view class="classify-item">
				<image src="../../static/images/classify-5.png" mode=""></image>
				<text>摇滚</text>
			</view>
			<view class="classify-item">
				<image src="../../static/images/classify-4.png" mode=""></image>
				<text>民谣</text>
			</view>
		</view>
		<!-- 热门专辑 -->
		<view class="album">
			<h1>热门专辑</h1>
			<view class="album-content">
				<view class="album-item">
					<image src="../../static/images/album1.jpg" mode=""></image>
				</view>
				<view class="album-item">
					<image src="../../static/images/album2.jpg" mode=""></image>
				</view>
				<view class="album-item">
					<image src="../../static/images/album3.jpg" mode=""></image>
				</view>
			</view>
		</view>
		<!-- 热门好词好曲 -->
		<view class="hot">
			<h1>热门好词好曲</h1>
			<view class="hot-content">
				<view class="hot-item">
					<image src="../../static/images/album2.jpg" mode=""></image>
				</view>
				<view class="hot-item">
					<image src="../../static/images/album1.jpg" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style lang="less">
	.header {
		overflow: hidden;
		height: 500rpx;
		background-color: #eb345d;

		.search {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 20px;
			width: 100%;
			/* padding: 12rpx 0; */
			height: 60rpx;
			margin-bottom: 10px;

			.search_left {
				width: 280px;
				display: flex;
				border-radius: 18px;
				line-height: 60rpx;
				margin-left: 10px;
				background-color: #ffffff;
				font-size: 14px;
				color: #d8d8d8;
			}

			.search_right {
				height: 60rpx;
				margin-right: 10px;
			}
		}

		swiper {
			height: 191px;

			.swiper-img {
				width: 100%;
			}
		}
	}

	.classify {
		width: 100%;
		height: 80px;
		margin-top: 10px;
		display: flex;
		justify-content: space-around;
		align-items: center;

		.classify-item {
			display: flex;
			flex-direction: column;

			image {
				width: 50px;
				height: 50px;
			}
		}
	}

	.album {
		margin-top: 10px;

		h1 {
			margin-left: 10px;
			font-size: 22px;
			font-weight: 700;
		}

		.album-content {
			margin-top: 8px;
			display: flex;
			justify-content: space-around;

			.album-item {
				width: 100px;
				height: 100px;
				border-radius: 10px;
				overflow: hidden;

				image {
					width: 100%;
					height: 100%;
				}
			}
		}
	}

	.hot {
		margin-top: 10px;

		h1 {
			margin-left: 10px;
			font-size: 22px;
			font-weight: 700;
		}

		.hot-content {
			display: flex;
			justify-content: space-around;
			margin-top: 10px;

			.hot-item {
				width: 46%;
				height: 100px;
				border-radius: 15px;
				overflow: hidden;
				margin-bottom: 10px;

				image {
					width: 100%;
					height: 100%;
				}
			}

		}
	}
</style>
